3.10.14 \(\int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^4 \, dx\) [914]

Optimal. Leaf size=100 \[ \frac {i a^5 c^4 \sec ^8(e+f x)}{8 f}+\frac {a^5 c^4 \tan (e+f x)}{f}+\frac {a^5 c^4 \tan ^3(e+f x)}{f}+\frac {3 a^5 c^4 \tan ^5(e+f x)}{5 f}+\frac {a^5 c^4 \tan ^7(e+f x)}{7 f} \]

[Out]

1/8*I*a^5*c^4*sec(f*x+e)^8/f+a^5*c^4*tan(f*x+e)/f+a^5*c^4*tan(f*x+e)^3/f+3/5*a^5*c^4*tan(f*x+e)^5/f+1/7*a^5*c^
4*tan(f*x+e)^7/f

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3567, 3852} \begin {gather*} \frac {a^5 c^4 \tan ^7(e+f x)}{7 f}+\frac {3 a^5 c^4 \tan ^5(e+f x)}{5 f}+\frac {a^5 c^4 \tan ^3(e+f x)}{f}+\frac {a^5 c^4 \tan (e+f x)}{f}+\frac {i a^5 c^4 \sec ^8(e+f x)}{8 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^5*(c - I*c*Tan[e + f*x])^4,x]

[Out]

((I/8)*a^5*c^4*Sec[e + f*x]^8)/f + (a^5*c^4*Tan[e + f*x])/f + (a^5*c^4*Tan[e + f*x]^3)/f + (3*a^5*c^4*Tan[e +
f*x]^5)/(5*f) + (a^5*c^4*Tan[e + f*x]^7)/(7*f)

Rule 3567

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*((d*Sec[
e + f*x])^m/(f*m)), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3603

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^4 \, dx &=\left (a^4 c^4\right ) \int \sec ^8(e+f x) (a+i a \tan (e+f x)) \, dx\\ &=\frac {i a^5 c^4 \sec ^8(e+f x)}{8 f}+\left (a^5 c^4\right ) \int \sec ^8(e+f x) \, dx\\ &=\frac {i a^5 c^4 \sec ^8(e+f x)}{8 f}-\frac {\left (a^5 c^4\right ) \text {Subst}\left (\int \left (1+3 x^2+3 x^4+x^6\right ) \, dx,x,-\tan (e+f x)\right )}{f}\\ &=\frac {i a^5 c^4 \sec ^8(e+f x)}{8 f}+\frac {a^5 c^4 \tan (e+f x)}{f}+\frac {a^5 c^4 \tan ^3(e+f x)}{f}+\frac {3 a^5 c^4 \tan ^5(e+f x)}{5 f}+\frac {a^5 c^4 \tan ^7(e+f x)}{7 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.22, size = 74, normalized size = 0.74 \begin {gather*} \frac {a^5 c^4 \sec (e) \sec ^8(e+f x) (35 i \cos (e)-35 \sin (e)+56 \sin (e+2 f x)+28 \sin (3 e+4 f x)+8 \sin (5 e+6 f x)+\sin (7 e+8 f x))}{280 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^5*(c - I*c*Tan[e + f*x])^4,x]

[Out]

(a^5*c^4*Sec[e]*Sec[e + f*x]^8*((35*I)*Cos[e] - 35*Sin[e] + 56*Sin[e + 2*f*x] + 28*Sin[3*e + 4*f*x] + 8*Sin[5*
e + 6*f*x] + Sin[7*e + 8*f*x]))/(280*f)

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 96, normalized size = 0.96

method result size
risch \(\frac {32 i a^{5} c^{4} \left (70 \,{\mathrm e}^{8 i \left (f x +e \right )}+56 \,{\mathrm e}^{6 i \left (f x +e \right )}+28 \,{\mathrm e}^{4 i \left (f x +e \right )}+8 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{35 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{8}}\) \(72\)
derivativedivides \(\frac {i a^{5} c^{4} \left (\frac {\left (\tan ^{8}\left (f x +e \right )\right )}{8}+\frac {\left (\tan ^{6}\left (f x +e \right )\right )}{2}-\frac {i \left (\tan ^{7}\left (f x +e \right )\right )}{7}+\frac {3 \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {3 i \left (\tan ^{5}\left (f x +e \right )\right )}{5}+\frac {\left (\tan ^{2}\left (f x +e \right )\right )}{2}-i \left (\tan ^{3}\left (f x +e \right )\right )-i \tan \left (f x +e \right )\right )}{f}\) \(96\)
default \(\frac {i a^{5} c^{4} \left (\frac {\left (\tan ^{8}\left (f x +e \right )\right )}{8}+\frac {\left (\tan ^{6}\left (f x +e \right )\right )}{2}-\frac {i \left (\tan ^{7}\left (f x +e \right )\right )}{7}+\frac {3 \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {3 i \left (\tan ^{5}\left (f x +e \right )\right )}{5}+\frac {\left (\tan ^{2}\left (f x +e \right )\right )}{2}-i \left (\tan ^{3}\left (f x +e \right )\right )-i \tan \left (f x +e \right )\right )}{f}\) \(96\)
norman \(\frac {a^{5} c^{4} \tan \left (f x +e \right )}{f}+\frac {a^{5} c^{4} \left (\tan ^{3}\left (f x +e \right )\right )}{f}+\frac {3 a^{5} c^{4} \left (\tan ^{5}\left (f x +e \right )\right )}{5 f}+\frac {a^{5} c^{4} \left (\tan ^{7}\left (f x +e \right )\right )}{7 f}+\frac {i a^{5} c^{4} \left (\tan ^{2}\left (f x +e \right )\right )}{2 f}+\frac {3 i a^{5} c^{4} \left (\tan ^{4}\left (f x +e \right )\right )}{4 f}+\frac {i a^{5} c^{4} \left (\tan ^{6}\left (f x +e \right )\right )}{2 f}+\frac {i a^{5} c^{4} \left (\tan ^{8}\left (f x +e \right )\right )}{8 f}\) \(154\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^4,x,method=_RETURNVERBOSE)

[Out]

I/f*a^5*c^4*(1/8*tan(f*x+e)^8+1/2*tan(f*x+e)^6-1/7*I*tan(f*x+e)^7+3/4*tan(f*x+e)^4-3/5*I*tan(f*x+e)^5+1/2*tan(
f*x+e)^2-I*tan(f*x+e)^3-I*tan(f*x+e))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 140, normalized size = 1.40 \begin {gather*} -\frac {-35 i \, a^{5} c^{4} \tan \left (f x + e\right )^{8} - 40 \, a^{5} c^{4} \tan \left (f x + e\right )^{7} - 140 i \, a^{5} c^{4} \tan \left (f x + e\right )^{6} - 168 \, a^{5} c^{4} \tan \left (f x + e\right )^{5} - 210 i \, a^{5} c^{4} \tan \left (f x + e\right )^{4} - 280 \, a^{5} c^{4} \tan \left (f x + e\right )^{3} - 140 i \, a^{5} c^{4} \tan \left (f x + e\right )^{2} - 280 \, a^{5} c^{4} \tan \left (f x + e\right )}{280 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^4,x, algorithm="maxima")

[Out]

-1/280*(-35*I*a^5*c^4*tan(f*x + e)^8 - 40*a^5*c^4*tan(f*x + e)^7 - 140*I*a^5*c^4*tan(f*x + e)^6 - 168*a^5*c^4*
tan(f*x + e)^5 - 210*I*a^5*c^4*tan(f*x + e)^4 - 280*a^5*c^4*tan(f*x + e)^3 - 140*I*a^5*c^4*tan(f*x + e)^2 - 28
0*a^5*c^4*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [A]
time = 1.19, size = 190, normalized size = 1.90 \begin {gather*} -\frac {32 \, {\left (-70 i \, a^{5} c^{4} e^{\left (8 i \, f x + 8 i \, e\right )} - 56 i \, a^{5} c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} - 28 i \, a^{5} c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} - 8 i \, a^{5} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{5} c^{4}\right )}}{35 \, {\left (f e^{\left (16 i \, f x + 16 i \, e\right )} + 8 \, f e^{\left (14 i \, f x + 14 i \, e\right )} + 28 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 56 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 70 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 56 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 28 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 8 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^4,x, algorithm="fricas")

[Out]

-32/35*(-70*I*a^5*c^4*e^(8*I*f*x + 8*I*e) - 56*I*a^5*c^4*e^(6*I*f*x + 6*I*e) - 28*I*a^5*c^4*e^(4*I*f*x + 4*I*e
) - 8*I*a^5*c^4*e^(2*I*f*x + 2*I*e) - I*a^5*c^4)/(f*e^(16*I*f*x + 16*I*e) + 8*f*e^(14*I*f*x + 14*I*e) + 28*f*e
^(12*I*f*x + 12*I*e) + 56*f*e^(10*I*f*x + 10*I*e) + 70*f*e^(8*I*f*x + 8*I*e) + 56*f*e^(6*I*f*x + 6*I*e) + 28*f
*e^(4*I*f*x + 4*I*e) + 8*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 264 vs. \(2 (90) = 180\).
time = 0.69, size = 264, normalized size = 2.64 \begin {gather*} \frac {2240 i a^{5} c^{4} e^{8 i e} e^{8 i f x} + 1792 i a^{5} c^{4} e^{6 i e} e^{6 i f x} + 896 i a^{5} c^{4} e^{4 i e} e^{4 i f x} + 256 i a^{5} c^{4} e^{2 i e} e^{2 i f x} + 32 i a^{5} c^{4}}{35 f e^{16 i e} e^{16 i f x} + 280 f e^{14 i e} e^{14 i f x} + 980 f e^{12 i e} e^{12 i f x} + 1960 f e^{10 i e} e^{10 i f x} + 2450 f e^{8 i e} e^{8 i f x} + 1960 f e^{6 i e} e^{6 i f x} + 980 f e^{4 i e} e^{4 i f x} + 280 f e^{2 i e} e^{2 i f x} + 35 f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**5*(c-I*c*tan(f*x+e))**4,x)

[Out]

(2240*I*a**5*c**4*exp(8*I*e)*exp(8*I*f*x) + 1792*I*a**5*c**4*exp(6*I*e)*exp(6*I*f*x) + 896*I*a**5*c**4*exp(4*I
*e)*exp(4*I*f*x) + 256*I*a**5*c**4*exp(2*I*e)*exp(2*I*f*x) + 32*I*a**5*c**4)/(35*f*exp(16*I*e)*exp(16*I*f*x) +
 280*f*exp(14*I*e)*exp(14*I*f*x) + 980*f*exp(12*I*e)*exp(12*I*f*x) + 1960*f*exp(10*I*e)*exp(10*I*f*x) + 2450*f
*exp(8*I*e)*exp(8*I*f*x) + 1960*f*exp(6*I*e)*exp(6*I*f*x) + 980*f*exp(4*I*e)*exp(4*I*f*x) + 280*f*exp(2*I*e)*e
xp(2*I*f*x) + 35*f)

________________________________________________________________________________________

Giac [A]
time = 0.99, size = 190, normalized size = 1.90 \begin {gather*} -\frac {32 \, {\left (-70 i \, a^{5} c^{4} e^{\left (8 i \, f x + 8 i \, e\right )} - 56 i \, a^{5} c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} - 28 i \, a^{5} c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} - 8 i \, a^{5} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{5} c^{4}\right )}}{35 \, {\left (f e^{\left (16 i \, f x + 16 i \, e\right )} + 8 \, f e^{\left (14 i \, f x + 14 i \, e\right )} + 28 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 56 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 70 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 56 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 28 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 8 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^4,x, algorithm="giac")

[Out]

-32/35*(-70*I*a^5*c^4*e^(8*I*f*x + 8*I*e) - 56*I*a^5*c^4*e^(6*I*f*x + 6*I*e) - 28*I*a^5*c^4*e^(4*I*f*x + 4*I*e
) - 8*I*a^5*c^4*e^(2*I*f*x + 2*I*e) - I*a^5*c^4)/(f*e^(16*I*f*x + 16*I*e) + 8*f*e^(14*I*f*x + 14*I*e) + 28*f*e
^(12*I*f*x + 12*I*e) + 56*f*e^(10*I*f*x + 10*I*e) + 70*f*e^(8*I*f*x + 8*I*e) + 56*f*e^(6*I*f*x + 6*I*e) + 28*f
*e^(4*I*f*x + 4*I*e) + 8*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Mupad [B]
time = 4.74, size = 95, normalized size = 0.95 \begin {gather*} \frac {a^5\,c^4\,\left (-{\cos \left (e+f\,x\right )}^8\,35{}\mathrm {i}+128\,\sin \left (e+f\,x\right )\,{\cos \left (e+f\,x\right )}^7+64\,\sin \left (e+f\,x\right )\,{\cos \left (e+f\,x\right )}^5+48\,\sin \left (e+f\,x\right )\,{\cos \left (e+f\,x\right )}^3+40\,\sin \left (e+f\,x\right )\,\cos \left (e+f\,x\right )+35{}\mathrm {i}\right )}{280\,f\,{\cos \left (e+f\,x\right )}^8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(e + f*x)*1i)^5*(c - c*tan(e + f*x)*1i)^4,x)

[Out]

(a^5*c^4*(40*cos(e + f*x)*sin(e + f*x) + 48*cos(e + f*x)^3*sin(e + f*x) + 64*cos(e + f*x)^5*sin(e + f*x) + 128
*cos(e + f*x)^7*sin(e + f*x) - cos(e + f*x)^8*35i + 35i))/(280*f*cos(e + f*x)^8)

________________________________________________________________________________________